package com.smzd.framework.oauth2.business;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.ClientDetailsService;

import com.smzd.framework.oauth2.domain.ClientApp;

public class OAuth2ClientAppService implements ClientDetailsService {
    @Autowired
    private ClientAppService appService;
    List<ClientApp> list = new ArrayList<ClientApp>();

    public OAuth2ClientAppService() {
    }

    @Override
    public ClientDetails loadClientByClientId(String clientId) throws OAuth2Exception {
        ClientApp app = appService.getClientAppByClientId(clientId);
        return app;
    }
}
